package com.demo.gulimall.product.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.demo.gulimall.product.entity.Attr;
import com.demo.gulimall.product.entity.ProductAttrValue;
import com.demo.gulimall.product.mapper.ProductAttrValueMapper;
import com.demo.gulimall.product.service.ProductAttrValueService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import java.util.List;

/**
 * spu属性值
 *
 * @author Chen Yuan
 */

@Service
public class ProductAttrValueServiceImpl extends ServiceImpl<ProductAttrValueMapper, ProductAttrValue> implements ProductAttrValueService {

    @Autowired
    private ProductAttrValueMapper productAttrValueMapper;

    @Override
    public List<ProductAttrValue> selectAttrsBySpuId(Long spuId) {
        return this.list(new QueryWrapper<ProductAttrValue>().eq("spu_id", spuId));
    }
}
